home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 26
/
Cream of the Crop 26.iso
/
program
/
qbsnip.zip
/
FINDRGB.BAS
< prev
next >
Wrap
BASIC Source File
|
1997-06-20
|
622b
|
30 lines
' FINDRGB.BAS
' Author Unknown
'
' public domain
' No warranties or guarantees are expressed or implied.
'
' Purpose: Find R, G and B of a pixel in a certain location.
DECLARE SUB findrgb (x!, y!)
SCREEN 13: PALETTE: CLS
LINE (100, 40)-STEP(100, 100), 93, BF
findrgb 160, 100
PRINT "RGB at location 160, 100:"; red; green; blue
findrgb 80, 50
PRINT "RGB at location 80, 50:"; red; green; blue
PALETTE: SCREEN 0, 0, 0, 0: WIDTH 80: COLOR 7, 0: CLS : END
SUB findrgb (x, y)
SHARED red, green, blue
c = POINT(x, y)
OUT &H3C7, c
red = INP(&H3C9)
green = INP(&H3C9)
blue = INP(&H3C9)
END SUB